using System.Drawing;
using ns1;

namespace Hardcodet.Wpf.TaskbarNotification.Interop
{
	/// <summary>
	/// Resolves the current tray position.
	/// </summary>
	public static class TrayInfo
	{
		/// <summary>
		/// Gets the position of the system tray.
		/// </summary>
		/// <returns>Tray coordinates.</returns>
		public static Point GetTrayLocation()
		{
			Class4 @class = new Class4();
			@class.method_1();
			Rectangle rectangle_ = @class.Rectangle_0;
			int x = 0;
			int y = 0;
			if (@class.Enum0_0 == Class4.Enum0.Left)
			{
				x = rectangle_.Left + 2;
				y = rectangle_.Bottom;
			}
			else if (@class.Enum0_0 == Class4.Enum0.Bottom)
			{
				x = rectangle_.Right;
				y = rectangle_.Bottom;
			}
			else if (@class.Enum0_0 == Class4.Enum0.Top)
			{
				x = rectangle_.Right;
				y = rectangle_.Top;
			}
			else if (@class.Enum0_0 == Class4.Enum0.Right)
			{
				x = rectangle_.Right;
				y = rectangle_.Bottom;
			}
			Point result = default(Point);
			result.X = x;
			result.Y = y;
			return result;
		}
	}
}
